package com.briup.day03;

/**
 * @author 谭梦寻
 * @version 1.1
 * 值的交换
 */
public class Test05 {
    public static void exchangeNum(int a, int b) {
        int temp = a;//使用中间变量
        a = b;
        b = temp;
    }

    public static void main(String[] args) {
//        一个数异或另一个数两次，还是这个数
        System.out.println(10 ^ 5 ^ 5);
        int a = 1;
        int b = 2;
//        a = a ^ b;// a = a ^ b
//        b = a ^ b; // b = a^b^b ->a
//        a = a ^ b; // a = a ^ b ^ a -> b
        exchangeNum(a,b);
        System.out.println("a:" + a);
        System.out.println("b:" + b);
        System.out.println(2-1.1f);



    }
}
